package player;

public class MoveAndScore {
	double score;
	Move move;
	
	/** constructor that returns a tuple of a move associated with it's score.
	 * 
	 * @param s is the score of a board (a double)
	 * @param m is the move associated with s.
	 */
	public MoveAndScore (double s, Move m) {
		score = s;
		move = m;
	}
	
	public MoveAndScore(){
		this(0,new Move());
	}
	
	public String toString() {
		String str = "[ Score: " + score + "  Move: ";
		if (move == null) {
			str += " null ]";
			return str;
		}
		switch (move.moveKind) {
			case Move.ADD:	str += "ADD to (" + move.x1 + ", " + move.y1 + ") ]"; break;
			case Move.STEP: str += "STEP from (" + move.x2 + ", " + move.y2 + ") to (" + move.x1 + ", " + move.y1 + ") ]"; break;
			case Move.QUIT: str += "QUIT ]"; break;
		}
		return str;
	}
	
}
